package com.Maykk.Demo02;

/**
 * @ClassName MyStringBuilder
 * @Description: TODO MystringBuilder 类
 * @Author: MaykkSTAR@163.com
 * @DATE: 2023/4/25
 */
public abstract class MyStringBuilder {
    public abstract void test();  // abstract 继承练习

    public String msb = "";

    public MyStringBuilder() { // 不带参构造方法
    }

    public MyStringBuilder(String str) {  // 带参构造方法
        this.msb = str;
    }

    public MyStringBuilder setmsb(String str) { // set方法
        this.msb = str;
        return this;
    }

    public MyStringBuilder append(String str) { // append方法练习
        this.msb += str;
        return this;
    }

    public void showStr() { // 输出msb方法
        System.out.println(this.msb);
    }
}
